package com.smscenter.server.core;

import java.util.Map;

/**
 * Created by ShanFei on 2016-05-30.
 */
public class QueryStrategy {
    private IQuery iQuery;
    public QueryStrategy(IQuery iQuery){
        this.iQuery=iQuery;
    }
    public String queryBalanceV2(Map<String, Object> params) throws Exception {
        String returnMsg = "";
        try {
            returnMsg = this.iQuery.queryBalanceV2(params);
        }catch (Exception e){
            throw  new Exception(e.getMessage());
        }
        return returnMsg;
    }
    public String queryBalance(Map<String, Object> params) throws Exception {
        String returnMsg = "";
        try {
            returnMsg = this.iQuery.queryBalance(params);
        }catch (Exception e){
            throw  new Exception(e.getMessage());
        }
        return returnMsg;
    }
    public String queryCollect(Map<String, Object> params) throws Exception{
        String returnMsg = "";
        try {
            returnMsg = this.iQuery.queryCollect(params);
        }catch (Exception e){
            throw  new Exception(e.getMessage());
        }
        return returnMsg;
    }
	public String querySendRecordInfo(Map<String, Object> params) throws Exception {
		String returnMsg = "";
        try {
            returnMsg = this.iQuery.querySendRecordInfo(params);
        }catch (Exception e){
            throw  new Exception(e.getMessage());
        }
        return returnMsg;
	}
	
	public IQuery getiQuery() {
		return iQuery;
	}

	public void setiQuery(IQuery iQuery) {
		this.iQuery = iQuery;
	}
}
